{extend name="public/base" /}
{block name="button"}
<button data-target-submit class='layui-btn layui-btn-sm'>保存数据</button>
<button data-target-backup class="layui-btn layui-btn-sm layui-btn-danger">取消编辑</button>
{/block}
{block name="content"}
<form method="post" class="layui-form layui-card" id="PayCoinsTable" onsubmit="return false">
    <div class="layui-card-body">
        <div class="layui-form-item">
            <label class="layui-form-label">币种</label>
            <div class="layui-input-block">
                <input name="coin_name" value="{$vo.coin_name|default=''}" required  vali-name="币种名称" placeholder="请输入币种名称" class="layui-input" type="text">
                <p class="help-block"><b>必填</b>，请填写币种名称</p>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">币种icon</label>
            <div class="layui-input-block">
                <input type="hidden" data-accept-mime="image/*" data-cut-width="96" data-cut-height="96"  required data-max-width="96" data-max-height="96" data-file-type="1" name="icon" value="{$vo.icon|default=''}">
                <p class="help-block"><b>必选</b>，请上传火币对应币种icon</p>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">充值网络</label>
            <div class="layui-input-block">
                <input name="network" value="{$vo.network|default=''}" required vali-name="充值网络" placeholder="充值网络" class="layui-input" type="text">
                <p class="help-block"><b>必填</b>，请填写充值网络</p>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">充币地址</label>
            <div class="layui-input-block">
                <input name="address" value="{$vo.address|default=''}" required  vali-name="充币地址" placeholder="充币地址" class="layui-input" type="text">
                <p class="help-block">请填写TRC20地址</p>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label label-required-next">充币状态</label>
                <div class="layui-input-block">
                <select name='pay_status' class='layui-select' >
                    <option value="1">可用</option>
                    <option value="-1">不可用</option>
                </select>
                    <p class="help-block"><b>必选</b></p>
                </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">排序</label>
            <div class="layui-input-block">
                <input type="number" name="sort" required vali-name="排序" placeholder="请输入排序" value="{$vo.sort|default='50'}" class="layui-input" >
                <p class="help-block">
                    <b>必须是数字排序越小越靠前</b>
                </p>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">最小充值额度</label>
            <div class="layui-input-block">
                <input name="pay_min_num" value="{$vo.pay_min_num|default=''}" required vali-name="最小充值额度" placeholder="最小充值额度" class="layui-input" type="text">
                <p class="help-block"><b>必填</b>，请填写最小充值额度</p>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label label-required-next">手续费类型</label>
            <div class="layui-input-block">
                <select name='fee_type' class='layui-select' >
                    <option value="1">按照数量</option>
                    <option value="2">按照百分比</option>
                </select>
                <p class="help-block"><b>必选</b></p>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">手续费</label>
            <div class="layui-input-block">
                <input name="fee" value="{$vo.fee|default=''}" required  vali-name="手续费" placeholder="请输入手续费" class="layui-input"  type="text">
                <p class="help-block"><b>必填</b>，请填写手续费(请输入百分比或者数量)</p>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">最小提币数量</label>
            <div class="layui-input-block">
                <input name="withdraw_min_num" value="{$vo.withdraw_min_num|default=''}" required  vali-name="最小提币数量" placeholder="最小提币数量" class="layui-input" type="text">
                <p class="help-block"><b>必填</b>，最小提币数量</p>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">最大提币数量</label>
            <div class="layui-input-block">
                <input name="withdraw_max_num" value="{$vo.withdraw_max_num|default=''}" required  vali-name="最小提币数量" placeholder="最小提币数量" class="layui-input" type="text">
                <p class="help-block"><b>必填</b>，最小提币数量</p>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label label-required-next">提币状态</label>
            <div class="layui-input-block">
                <select name='withdraw_status' class='layui-select' >
                    <option value="1">可用</option>
                    <option value="-1">不可用</option>
                </select>
                <p class="help-block"><b>必选</b></p>
            </div>
        </div>
    </div>
    <div class="hr-line-dashed"></div>
    <input type='hidden' value='{$vo.id|default=0}' name='id'>
    <div class="layui-form-item text-center">
        <button data-target-submit class="layui-btn">保存数据</button>
        <button data-target-backup class="layui-btn layui-btn-danger" type="button">取消编辑</button>
    </div>
</form>
{/block}
{block name="script"}
<script type="text/javascript">
    require(["jquery"],function ($) {
        $.menu.highlight_subnav("{:url('pay-coins/index')}");
        $('[name=icon]').uploadOneImage();
        $.form.setValue("withdraw_status","{$vo.withdraw_status|default='1'}")
        $.form.setValue("pay_status","{$vo.pay_status|default='1'}")
        $.form.setValue("fee_type","{$vo.fee_type|default='1'}")
        $('#PayCoinsTable').vali(function (form) {
            $.form.load('{:url()}', form, 'post');
        });
    });
</script>
{/block}